The present invention relates to a self-diagnosis device and a self-diagnosis method, for example, relates to a self-diagnosis device and a self-diagnosis method which are built in a semiconductor device such as a microcomputer.
In general, regarding self-diagnosis processing of a microcomputer, an execution order of self-diagnosis of a plurality of functional blocks, which are targets of the self-diagnosis, is fixedly defined in advance. In recent years, the number of functional blocks increases due to miniaturization of a process, and accordingly, the execution time of self-diagnosis increases.
Here, Japanese Unexamined Patent Application Publication No. 2012-252373 discloses a technique related to a self-diagnosis device for efficiently executing self-diagnosis. The self-diagnosis device according to Japanese Unexamined Patent Application Publication No. 2012-252373 decides the execution order of self-diagnosis of each functional block based on an operating frequency during normal operation of each functional block and/or a priority setting value of each functional block when a self-diagnosis mode is started. Thereafter, the self-diagnosis device executes self-diagnosis processing of each functional block according to the execution order. When a time limit is exceeded or a threshold value of the number of self-diagnosis execution times is exceeded, the self-diagnosis processing of functional blocks of subsequent execution orders is not executed. Thereby, it is possible to preferentially execute self-diagnosis for functional blocks whose operating frequency is high.